
import { createStore, applyMiddleware, combineReducers } from 'redux'
import thunk from 'redux-thunk'
import rootReducer from '../reducers'
import { routerReducer } from 'react-router-redux'

const configureStore = preloadedState => createStore(
  combineReducers({
    ...rootReducer,
    routing: routerReducer
  }),
  preloadedState,
  applyMiddleware(thunk)
)

export default configureStore
